package com.game.battleship.data.ai;

import com.game.battleship.data.GameAi;


/**
 * @author vtkhanh
 *
 */
public class AiFactory {		
	
	private static AiFactory instance = new AiFactory();
	
	/**
	 * 
	 * @return the single instance of the Factory
	 */
	public static AiFactory getInstance(){
		return instance;
	}
	
	/**
	 * Produces ai player from:
	 * 
	 * @param	difficulty:	 ai player type
	 * @param 	game:		 game in which the ai will participate
	 * @return 	the created AiPlayer instance
	 */
	public AiPlayer produceAiPlayer(short difficulty, GameAi game){
		switch (difficulty) {
		case GameAi.DIFF_EASSY:
			return new AiPlayerRandom(game);		
		default:
			return null;			
		}		
	}	
}
